package com.yunzheng.dto;

import com.yunzheng.constants.SystemConstants;
import lombok.AllArgsConstructor;
import lombok.Data;
import lombok.NoArgsConstructor;
import org.hibernate.validator.constraints.Length;

import javax.validation.constraints.NotBlank;
import javax.validation.constraints.Pattern;

/**
 * @author Sun
 * @date 2020-08-01 17:50
 */
@Data
@NoArgsConstructor
@AllArgsConstructor
public class PasswordForgetDTO {

	@NotBlank(message = "手机号不能为空")
	@Pattern(regexp = SystemConstants.PHONE_REGEX, message = "无效的手机号")
	public String userPhone;

	@NotBlank(message = "新密码不能为空")
	@Length(min = 6, max = 16, message = "密码长度不合标准(6~16位)")
	public String newPasswd;


	@NotBlank(message = "新密码不能为空")
	@Length(min = 6, max = 16, message = "密码长度不合标准(6~16位)")
	public String newPasswdTwo;


	@NotBlank(message = "验证码不能为空")
	public String captcha;

}
